window: Remove set_icon_from_file
authorTimm Bäder <mail@baedert.org>
Sun, 30 Dec 2018 05:25:57 +0000 (06:25 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Feb 2019 13:11:43 +0000 (08:11 -0500)
Not all backends support setting window icons from raw pixel data, so
remove the public API in GtkWindow for it.

gtk/gtkwindow.c
gtk/gtkwindow.h

index 44b83e678aca93b08dbea777536f4662dd7a7072..491c4aa291de375cfcc542cb4f9aa21f047fdb79 100644 (file)
@@ -4977,38 +4977,6 @@ load_texture_verbosely (const char *filename,
   return texture;
 }
 
-/**
- * gtk_window_set_icon_from_file:
- * @window: a #GtkWindow
- * @filename: (type filename): location of icon file
- * @err: (allow-none): location to store error, or %NULL.
- *
- * Sets the icon for @window.
- * Warns on failure if @err is %NULL.
- *
- * This function is equivalent to calling gtk_window_set_icon()
- * with a surface created by loading the image from @filename.
- *
- * Returns: %TRUE if setting the icon succeeded.
- **/
-gboolean
-gtk_window_set_icon_from_file (GtkWindow   *window,
-                              const gchar *filename,
-                              GError     **err)
-{
-  GdkTexture *texture = load_texture_verbosely (filename, err);
-
-  if (texture)
-    {
-      gtk_window_set_icon (window, texture);
-      g_object_unref (texture);
-      
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
 /**
  * gtk_window_set_default_icon_list:
  * @list: (element-type GdkTexture) (transfer container): a list of #GdkTextures
index 35143ab700870791c775645dd30e2bee33a2b0bf..889ca89656a94f3a5d5b5cdbbaecd8cd1866f8f7 100644 (file)
@@ -284,10 +284,6 @@ GDK_AVAILABLE_IN_ALL
 void       gtk_window_set_icon_name                (GtkWindow   *window,
                                                    const gchar *name);
 GDK_AVAILABLE_IN_ALL
-gboolean   gtk_window_set_icon_from_file           (GtkWindow   *window,
-                                                   const gchar *filename,
-                                                   GError     **err);
-GDK_AVAILABLE_IN_ALL
 GdkTexture *  gtk_window_get_icon                  (GtkWindow  *window);
 GDK_AVAILABLE_IN_ALL
 const gchar * gtk_window_get_icon_name             (GtkWindow  *window);